package com.huage_08.lesson_05;

import java.io.*;
import java.net.ServerSocket;
import java.net.Socket;

public class ServerTest {
    public static void main(String[] args) throws IOException {
        //创建服务器端SocketServer对象
        ServerSocket ss = new ServerSocket(1997);

        //监听客户端
        while (true){
            Socket s = ss.accept();
            new Thread(new ServerThread(s)).start();
        }

        //关闭服务器
//        ss.close();
    }
}
